﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ABCLogistic_System_V2._0.DA;

namespace ABCLogistic_System_V2._0.GUI
{
    public partial class frmQTHT_Doimatkhau : Form
    {
        ABCLogisticsEntities context = new ABCLogisticsEntities();
        TAIKHOAN taikhoan = new TAIKHOAN();

        public frmQTHT_Doimatkhau()
        {
            InitializeComponent();
        }

        private void btnluu_Click(object sender, EventArgs e)
        {
            //var matkhaucu = from p in context.TAIKHOANs
            //                  where p.MATKHAU.Contains(txtmatkhaucu.Text)
            //                  select p;
            if (txtmatkhaucu.Text == "logistic")
            {
                if (txtmatkhaumoi.Text == txtnhapmatkhaulai.Text)
                {
                    frmQTHT_Nguoidung nguiodung = new frmQTHT_Nguoidung();
                    nguiodung.txtmatkhau.Text = txtmatkhaumoi.Text;
                        MessageBox.Show("Mật khẩu đã được thay đổi!");
                }
                else MessageBox.Show("Mật khẩu mới không giống nhau!");
            }
            else MessageBox.Show("Mật khẩu không đúng!");
        }
    }
}
